package com.music.muisc.services;


import com.music.muisc.dao.MusicRepository;
import com.music.muisc.entity.Music;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class MusicService {

    @Autowired
    MusicRepository musicRepository;

    public List<Music> getAll(){
        return musicRepository.findAll();
    }

    public Music save(Music music){
        return musicRepository.save(music);
    }
}
